﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Search.aspx.cs" Inherits="Search" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <table style="width: 98%; font-size: 12px;">
            <tr>
                <td>关键词:<asp:TextBox ID="TextBox2" Width="150" runat="server"></asp:TextBox>
                        <asp:Button ID="Button1" runat="server" Text="查询" onclick="Button1_Click" /></td>
                 
            </tr>
             <tr>
                 
                    <td>
                        &nbsp;</td>
            </tr>
        </table>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:AirconConnectionString %>" 
            
            
            SelectCommand="SELECT * FROM [VWCustomersForSearch] WHERE ([forsearch] LIKE '%' + @forsearch + '%') ORDER BY [ID] DESC">
            <SelectParameters>
                <asp:ControlParameter ControlID="TextBox2" Name="forsearch" PropertyName="Text" 
                    Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:GridView ID="GridView1" runat="server" DataSourceID="SqlDataSource1" 
            AllowPaging="True" AutoGenerateColumns="False" BackColor="White" 
            BorderColor="#CC9966" BorderStyle="None" BorderWidth="1px" CellPadding="4" 
            DataKeyNames="ID" Font-Size="12px" HorizontalAlign="Center" Width="98%">
            <Columns>
                <asp:BoundField DataField="BigClass" HeaderText="大类" SortExpression="BigClass">
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="SmallClass" HeaderText="小类" 
                    SortExpression="SmallClass">
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="CTMID" HeaderText="号码" SortExpression="CTMID">
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" Width="50px" />
                </asp:BoundField>
                <asp:BoundField DataField="CTMCompany" HeaderText="公司" 
                    SortExpression="CTMCompany">
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="CTMUsername" HeaderText="联系人" 
                    SortExpression="CTMUsername">
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="CTMPhone" HeaderText="电话" SortExpression="CTMPhone">
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle BorderStyle="None" />
                </asp:BoundField>
                <asp:BoundField DataField="CTMFax" HeaderText="传真" SortExpression="CTMFax">
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="CTMAddress" HeaderText="地址" 
                    SortExpression="CTMAddress">
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="LastTime" HeaderText="上次时间" 
                    SortExpression="LastTime">
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Status" HeaderText="情况" SortExpression="Status">
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="LastRemarks" HeaderText="内容" 
                    SortExpression="LastRemarks">
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" VerticalAlign="Top" />
                </asp:BoundField>
                <asp:BoundField DataField="NextContectTime" HeaderText="提醒" 
                    SortExpression="NextContectTime">
                <HeaderStyle HorizontalAlign="Left" />
                <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:CheckBoxField DataField="isStatus" HeaderText="记录状态" 
                    SortExpression="isStatus" />
                <asp:BoundField DataField="inTime" HeaderText="记录时间" SortExpression="inTime" />
            </Columns>
            <FooterStyle BackColor="#FFFFCC" ForeColor="#330099" />
            <HeaderStyle BackColor="#990000" Font-Bold="True" ForeColor="#FFFFCC" />
            <PagerStyle BackColor="#FFFFCC" ForeColor="#330099" HorizontalAlign="Center" />
            <RowStyle BackColor="White" ForeColor="#330099" />
            <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="#663399" />
            <SortedAscendingCellStyle BackColor="#FEFCEB" />
            <SortedAscendingHeaderStyle BackColor="#AF0101" />
            <SortedDescendingCellStyle BackColor="#F6F0C0" />
            <SortedDescendingHeaderStyle BackColor="#7E0000" />
        </asp:GridView>
    </form>
</body>
</html>
